//获取权限列表，配置权限时用
function getPermissions () {
    return $axios({
        url: '/permission/all',
        method: 'get'
    })
}

function getPagePermissions (params) {
    return $axios({
        url: '/permission/page',
        method: 'get',
        params
    })
}

// 删除当前列的接口
const deletePermission = (id) => {
    return $axios({
        url: '/permission',
        method: 'delete',
        params: { id }
    })
}

const createPermission = (params) => {
    return $axios({
        url: '/permission',
        method: 'post',
        data: { ...params }
    })
}

// 修改接口
const updatePermission = (params) => {
    return $axios({
        url: '/permission',
        method: 'put',
        data: { ...params }
    })
}